package demo1;

import java.util.Random;
import java.util.Scanner;

public class demo_3 {
    public static void main(String[] args) {
        int[] a = new int[5];
        Scanner sc = new Scanner(System.in);
        Random r = new Random();

        for (int i = 0; i < a.length; i++) {
            a[i] = sc.nextInt();
        }
        for (int i = 0; i < a.length; i++){
            int temp = a[i];
            int k;
            while((k = r.nextInt(5)) == i);
            a[i] = a[k];
            a[k] = temp;
        }
        for (int i = 0; i < a.length; i++) {
            System.out.println(a[i]);
        }
    }
}
